package list;


public class TestDList {

        /**
         * @param args
         */
        public static void main(String[] args) {
                DList l1 = new DList();
                System.out.println("\ncurrent List: " + l1);
                System.out.println("Size should be 0: " + l1.length());
                System.out.println("isEmpty is true: " + l1.isEmpty());
                
                l1.insertFront(new Integer(1));
                System.out.println("\ncurrent List: " + l1);
                System.out.println("Front Item: " + l1.front().item());
                System.out.println("Back Item: " + l1.back().item());
                System.out.println("Size should be 1: " + l1.length());
                System.out.println("isEmpty is false: " + l1.isEmpty());
                
                l1.insertFront(new Integer(0));
                System.out.println("\ncurrent List: " + l1);
                System.out.println("Front Item: " + l1.front().item());
                System.out.println("Back Item: " + l1.back().item());
                System.out.println("Size should be 2: " + l1.length());
                System.out.println("isEmpty is false: " + l1.isEmpty());
                
                l1.insertBack(new Integer(2));
                System.out.println("\ncurrent List: " + l1);
                System.out.println("Front Item: " + l1.front().item());
                System.out.println("Back Item: " + l1.back().item());
                System.out.println("Size should be 3: " + l1.length());
                System.out.println("isEmpty is false: " + l1.isEmpty());
                
                l1.insertBack(new Integer(3));
                System.out.println("\ncurrent List: " + l1);
                System.out.println("Front Item: " + l1.front().item());
                System.out.println("Back Item: " + l1.back().item());
                System.out.println("Size should be 4: " + l1.length());
                System.out.println("isEmpty is false: " + l1.isEmpty());
        
                l1.insertBack(new Integer(4));
                System.out.println("\ncurrent List: " + l1);
                System.out.println("Front Item: " + l1.front().item());
                System.out.println("Back Item: " + l1.back().item());
                System.out.println("Size should be 5: " + l1.length());
                System.out.println("isEmpty is false: " + l1.isEmpty());
        
                l1.remove(l1.front());
                System.out.println("\ncurrent List: " + l1);
                System.out.println("Front Item: " + l1.front().item());
                System.out.println("Back Item: " + l1.back().item());
                System.out.println("Size should be 4: " + l1.length());
                
                l1.remove(l1.back());
                System.out.println("\ncurrent List: " + l1);
                System.out.println("Front Item: " + l1.front().item());
                System.out.println("Back Item: " + l1.back().item());
                System.out.println("Size should be 3: " + l1.length());
                
        
        }
        
        

}
